package com.supkong.java.predicate;

import lombok.Data;
import lombok.ToString;

/**
 * @program: jdk8-learning-example
 * @author: Kong
 * @create: 2020-04-09 16:20
 * @description:
 */
@Data
@ToString
public class Apple {
    private String color;
    private Integer weight;
    public boolean isGreenApple(){
        return "green".equals(this.color);
    }
    public boolean isHeavyApple(){
        return this.weight>150;
    }

    public Apple(String color, Integer weight) {
        this.color = color;
        this.weight = weight;
    }
}
